package security ;

import java.io.*;
import java.net.*;
import java.rmi.server.*;

public class CipherServerSocketFactory
		implements RMIServerSocketFactory
{

	public CipherServerSocketFactory() {
	}

	public ServerSocket createServerSocket( int port) throws IOException {
		return new CipherServerSocket( port);
	}

	public int hashCode() {
		return KeyManager.getInstance().getPattern();
	}

	public boolean equals( Object obj) {
		return (getClass() == obj.getClass() && KeyManager.getInstance().getPattern() == ((CipherServerSocketFactory)obj).hashCode());
	}
}
